﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Cirrostrata.CycleList">

    <Style TargetType="{x:Type local:CycleList}">
        
        <Setter Property="Background" Value="{x:Static SystemColors.WindowBrush}"/>

        <Setter Property="Template">
            <Setter.Value>

                <ControlTemplate TargetType="{x:Type local:CycleList}">
                    <Grid Background="{TemplateBinding Control.Background}" SnapsToDevicePixels="True">
                        <ItemsPresenter>
                            <ItemsPresenter.Resources>
                                <Style TargetType="{x:Type local:CycleListItem}">
                                    <Style.Resources>
                                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{x:Static SystemColors.WindowColor}"/>
                                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="{x:Static SystemColors.WindowTextColor}"/>
                                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{x:Static SystemColors.WindowColor}"/>
                                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="{x:Static SystemColors.WindowTextColor}"/>
                                    </Style.Resources>
                                </Style>

                            </ItemsPresenter.Resources>
                        </ItemsPresenter>
                    </Grid>
                </ControlTemplate>

            </Setter.Value>
        </Setter>
        
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <local:CyclePanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        
    </Style>
</ResourceDictionary>
